package com.twh.www.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.twh.www.entity.WnGoods;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;


public interface WnGoodsService extends IService<WnGoods> {

    // 查询所有商品
    List<WnGoods> getAllGoods();

    // 分页查询所有商品
    com.baomidou.mybatisplus.extension.plugins.pagination.Page<WnGoods> getGoodsByPage(int pageNum, int pageSize);

    // 查询热门商品
    List<WnGoods> getHotGoods();
    // 模糊查询商品并分页
    Page<WnGoods> searchGoodsByPage(String keyword, int pageNum, int pageSize);
    // ... 现有代码 ...
// 新增
    Page<WnGoods> getGoodsByCategory(int categoryId, int pageNum, int pageSize);


    Page<WnGoods> getadminGoodsByPage(int adminPage, int pagesSize);


    boolean updateGoodsStock(Integer id, Integer quantity);

    boolean deleteGoodsById(Integer id);

}
